package com.cardone.platform.common.service;

import com.cardone.platform.usercenter.util.UserUtils;
import com.cardone.security.token.util.TokenUtils;
import lombok.Getter;
import lombok.Setter;

/**
 * 公共服务
 *
 * @author yaohaitao
 */
@Getter
@Setter
@org.springframework.transaction.annotation.Transactional(readOnly = true)
public class CommonDefaultService implements CommonService {
    @Override
    public String readTokenKey() {
        String id = UserUtils.readId();

        return TokenUtils.generate(id).getKey();
    }
}
